mk=angular.module("aa",[]);   
mk.controller("tjsj",["$scope",function($scope){
	dataStr=localStorage.getItem("ly");
	if(dataStr){
		dataObj=JSON.parse(dataStr);
		$scope.zhi=dataObj.info
	}else{
		localStorage.setItem("ly",'{"info":[]}');
	}
	    
	//提交    
	$scope.add=function(){
		dataStr=localStorage.getItem("ly");
		
		dataObj=JSON.parse(dataStr);
		dataObj.info.push({"cf":$scope.cf,"ls":$scope.ls,"yf":$scope.yf,"hzp":$scope.hzp});
		$scope.zhi=dataObj.info;   
		dataStr=JSON.stringify(dataObj);
		localStorage.setItem("ly",dataStr)
		$(".input").val("")
	}
	$scope.sc=function(index){
		dataObj=JSON.parse(dataStr);  
		dataObj.info.splice(index,1)
		$scope.zhi=dataObj.info
		dataStr=JSON.stringify(dataObj)
		localStorage.setItem("ly",dataStr)
	}
}])